package com.chuanke.ckfamily.service.social;

import java.util.Date;

import com.chuanke.ckfamily.dao.social.model.FamilyFinance;
import com.chuanke.ckfamily.service.exception.CFException;
import com.weijie.core.IBaseBiz;

public interface FamilyFinanceService extends IBaseBiz<FamilyFinance> {

	void excuteIncomeTask();

	/**
	 * 增加收益
	 *
	 * @param uid
	 * @param channel
	 * @throws CFException
	 * @throws Exception
	 */
	boolean addIncome(Long uid, Long channel) throws CFException;

	/**
	 * 查找一个用户当天的分享收益
	 * 
	 * @param uid
	 * @param channel 渠道 1分享 2邀请
	 * @param time    当天时间
	 * @return
	 */
	FamilyFinance findByChannel(Long uid, Long channel, Date time);

	void familyCount(Long fid, Long allMoney, Long leaderMoney, Long superLeaderMoney, Long packetMoney);
}